package com.ecds.monitor.helper;

import com.ecds.monitor.MainServer;

import cn.emay.sdk.client.api.Client;

public class SystemHelper {
	/*
	 * 发送短信
	 */
	public static void testSendSMS(String message) {
		try {
			Client sdkclient = new Client("5SDK-CEA-6688-JBTQP", "adccefb");
			String[] tel = MainServer.rb.getString("monitoring.telphone")
					.split(",");
			for (int i = 0; i < tel.length; i++) {
				if (!tel[i].equals("")) {
					int a = sdkclient.sendSMS(new String[] { tel[i] }, message,
							3);
					System.out.println("短信发送结果:" + a);
				}
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static boolean notNullOrEmpty(String str) {
		return (str != null && !str.isEmpty());
	}
}
